package cn.e4j.modular.system.service;

import cn.e4j.core.dto.impl.Dto;
import cn.e4j.modular.system.entity.SysMail;
import cn.e4j.modular.system.model.EmailProperties;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.mail.MessagingException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 系统邮件参数配置表 服务类
 * </p>
 *
 *
 * @author wenchuan.li
 * @since 2018-12-13
 */
public interface SysMailService extends IService<SysMail> {

    List<Map<String, Object>> getMailList(Page<Object> page, Dto inDto);

    void add(SysMail mail);

    void edit(SysMail mail);

    void delete(SysMail mail);

    void deleteBatch(List<SysMail> mailList);

    void sendEmailWithAttach(EmailProperties properties) throws MessagingException;

    Boolean existedTheParams(String id);
}
